This page last changed on Feb 26, 2008.
eDocs Home > BEA AquaLogic Data Services Platform Documentation > Data Services Developer's Guide > Contents How To Validate, Build, Export, and Package Dataspace Projects from the Command LineThis section describes how to validate, build, export and package ALDSP dataspace projects from the command line. TopicsData Service File Validation During DeploymentIn the Eclipse IDE a dataspace project's data service (.ds) files are validated automatically according to the following deployment model:
The ALDSP Export mechanism allows for a dataspace project's artifacts to be packaged in a JAR the contents of which are identical to what would be generated from the IDE for deployment to a WebLogic server. Dataspace Packaging from the Command-lineThere is also an occasional need for operations such as validate, build, export, and package to be available in a scripting environment. This section describes an Ant script file, cmdline_build.xml, provided in the "bin" directory under the ALDSP installation that can be invoked by a user to:
Syntax Summary
Command-Line Ant Build TargetsThis section describes available ALDSP ant build targets. Build XML FileThe build XML file: cmdline_build.xml will be provided in the directory: <dsp_home>/bin To see a list of build targets with short descriptions in the Ant build XML file, invoke the command below at the prompt window:
ant -f <bea_home>/aldsp_3.0/bin/cmdline_build.xml -projecthelp
"help"The "help" target is the default build target. It shows a list of available ALDSP commands and the syntax needed to invoke the command in Java.
Build Invocation Syntax via JavaNote that the syntax shows the portion starting with "aldsp_command" below. However, the full syntax to be entered for Java at the prompt window is:
Build Invocation Syntax via AntIf invoked via Ant, ALDSP command parameters should be specified as Ant properties. For example, to get help about the "export-artifacts" command, enter: ant -f <aldsp_install_dir>/bin/cmdline_build.xml help -Dcmd=export-artifacts To get help on all ALDSP commands, specify the following property: -Dcmd=all or omit the optional -Dcmd property completely: ant -f <aldsp_install_dir>/bin/cmdline_build.xml help all "validate-project"The "validate-project" target validates the data service (.ds) files in the specified dataspace project. Data service error messages that would show up in the Eclipse IDE's Problems view are sent to stdout when this target is invoked. A "fail" status is returned by this target if any error exists in a .ds data service file in the project.
"export-mediator-client"The export-mediator-client target is for generating an ALDSP mediator client JAR file of a dataspace project. The default value of the output JAR file name is:
"export-ws-client"The export-ws-client target generates a web services mediator client JAR file from the specified comma-separated list of wsmap file locators in a dataspace project. The default value of the output JAR filename is: <project>-ws-client.jar The default value of the ws_locators is all wsmap file locators in the project. An example of a wsmap file locator is: ld:logical/wsmaps/CUSTOMER.ws
"export-artifacts"The "export-artifacts" target creates a JAR file containing the definitions and artifacts of the dataspace project. The content would be identical to the artifact JAR file created in the IDE. By default , the name of the artifact JAR file is: <project>-artifacts.jar
Command-line Examples using Ant and JavaThis section contains several examples of invoking the ALDSP command using Ant and Java. Getting the help text of all the commands using Ant and Java at the prompt windowAnt:
Java:
Getting the help text of a specific command using Ant and Java at the prompt windowAnt:
Java:
Exporting the artifacts of a dataspace projectThis example exports the project: DspProj in workspace: /MyWorkspace to: /temp directory using the default JAR file name: <project>-artifacts.jar Ant:
Java: java -cp <eclipse_home>/startup.jar org.eclipse.core.launcher.Main -data /MyWorkspace -application com.bea.dsp.ide.app.runCmdline export-artifacts DspProj /temp |
Document generated by Confluence on Apr 28, 2008 15:54 |